package com.lyl.lawyer.service.impl;

import com.cn.lyl.lawyer.dao.NavMapper;
import com.cn.lyl.lawyer.model.entity.NavModel;
import com.cn.lyl.lawyer.service.NavService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NavServiceImpl implements NavService {

    @Autowired
    private NavMapper navMapper;
    @Override
    public List<NavModel> findAll(NavModel navModel) {
        return navMapper.findAll(navModel);
    }

    @Override
    public int getCount(NavModel navModel) {
        return navMapper.countFindAll(navModel);
    }

    @Override
    public void add(NavModel navModel) {
        navMapper.add(navModel);
    }

    @Override
    public void delete(Integer id) {
        navMapper.delete(id);
    }

    @Override
    public NavModel findById(Integer id) {
        return navMapper.findById(id);
    }

    @Override
    public void change(NavModel navModel) {
        navMapper.update(navModel);

    }
}
